define("vs/htmlMode-Bz67EXwp",["module","exports","./workers-DcJshg-q","./lspLanguageFeatures-kM9O9rjY","./editor.api-CalNCsUg"],function(e,t,r,n,o){"use strict";class i{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=r.createWebWorker({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL(""+new URL(require.toUrl("./assets/html.worker-B51mlPHg.js"),document.baseURI).href,new URL(e.uri,document.baseURI).href),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}}class a extends n.CompletionAdapter{constructor(e){super(e,[".",":","<",'"',"=","/"])}}function g(e){return{dispose:()=>s(e)}}function s(e){for(;e.length;)e.pop().dispose()}t.CompletionAdapter=n.CompletionAdapter,t.DefinitionAdapter=n.DefinitionAdapter,t.DiagnosticsAdapter=n.DiagnosticsAdapter,t.DocumentColorAdapter=n.DocumentColorAdapter,t.DocumentFormattingEditProvider=n.DocumentFormattingEditProvider,t.DocumentHighlightAdapter=n.DocumentHighlightAdapter,t.DocumentLinkAdapter=n.DocumentLinkAdapter,t.DocumentRangeFormattingEditProvider=n.DocumentRangeFormattingEditProvider,t.DocumentSymbolAdapter=n.DocumentSymbolAdapter,t.FoldingRangeAdapter=n.FoldingRangeAdapter,t.HoverAdapter=n.HoverAdapter,t.ReferenceAdapter=n.ReferenceAdapter,t.RenameAdapter=n.RenameAdapter,t.SelectionRangeAdapter=n.SelectionRangeAdapter,t.fromPosition=n.fromPosition,t.fromRange=n.fromRange,t.toRange=n.toRange,t.toTextEdit=n.toTextEdit,t.WorkerManager=i,t.setupMode=function(e){const t=[],r=[],d=new i(e);t.push(d);const l=(...e)=>d.getLanguageServiceWorker(...e);return function(){const{languageId:t,modeConfiguration:i}=e;s(r),i.completionItems&&r.push(o.languages.registerCompletionItemProvider(t,new a(l))),i.hovers&&r.push(o.languages.registerHoverProvider(t,new n.HoverAdapter(l))),i.documentHighlights&&r.push(o.languages.registerDocumentHighlightProvider(t,new n.DocumentHighlightAdapter(l))),i.links&&r.push(o.languages.registerLinkProvider(t,new n.DocumentLinkAdapter(l))),i.documentSymbols&&r.push(o.languages.registerDocumentSymbolProvider(t,new n.DocumentSymbolAdapter(l))),i.rename&&r.push(o.languages.registerRenameProvider(t,new n.RenameAdapter(l))),i.foldingRanges&&r.push(o.languages.registerFoldingRangeProvider(t,new n.FoldingRangeAdapter(l))),i.selectionRanges&&r.push(o.languages.registerSelectionRangeProvider(t,new n.SelectionRangeAdapter(l))),i.documentFormattingEdits&&r.push(o.languages.registerDocumentFormattingEditProvider(t,new n.DocumentFormattingEditProvider(l))),i.documentRangeFormattingEdits&&r.push(o.languages.registerDocumentRangeFormattingEditProvider(t,new n.DocumentRangeFormattingEditProvider(l)))}(),t.push(g(r)),g(t)},t.setupMode1=function(e){const t=new i(e),r=(...e)=>t.getLanguageServiceWorker(...e);let g=e.languageId;o.languages.registerCompletionItemProvider(g,new a(r)),o.languages.registerHoverProvider(g,new n.HoverAdapter(r)),o.languages.registerDocumentHighlightProvider(g,new n.DocumentHighlightAdapter(r)),o.languages.registerLinkProvider(g,new n.DocumentLinkAdapter(r)),o.languages.registerFoldingRangeProvider(g,new n.FoldingRangeAdapter(r)),o.languages.registerDocumentSymbolProvider(g,new n.DocumentSymbolAdapter(r)),o.languages.registerSelectionRangeProvider(g,new n.SelectionRangeAdapter(r)),o.languages.registerRenameProvider(g,new n.RenameAdapter(r)),"html"===g&&(o.languages.registerDocumentFormattingEditProvider(g,new n.DocumentFormattingEditProvider(r)),o.languages.registerDocumentRangeFormattingEditProvider(g,new n.DocumentRangeFormattingEditProvider(r)))},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});